home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1986 February / 1986-02.d64 / custom labels (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  71 lines

  1. 10 poke53280,2:poke53281,15
  2. 20 print"[147][144]  press 1[146] for graphics labels"
  3. 30 print"  press 2[146] for enhanced printing labels"
  4. 40 getp$:p=val(p$):ifp<1orp>2then40
  5. 50 print"[147]":gosub630:x$="                                        "
  6. 60 print"";:fori=8to12:printx$;:next:print"[146][144]"
  7. 70 ifp=2thenprint"  [146]"
  8. 80 print" [146][144]":gosub680:printcp$"   (1)  design a special label"
  9. 90 print"   (2)  load a label from disk":print"   (3)  change the label above
  10. 100 [153]"   (4)  save the label above to disk"
  11. 110 [153]"   (5)  print the label above":[153]"         enter your choicewait
  12. 120 getm$:m=val(m$):ifm<1orm>5then120
  13. 130 onmgoto550,460,550,370
  14. 140 rem * print routine *
  15. 150 gosub680:printcp$"position the label in the printer so"
  16. 160 print"that the top of the label is at the top"
  17. 170 print"of the printhead and press return."
  18. 180 getx$:ifx$<>chr$(13)then180
  19. 190 open3,3:open4,4:open6,4,6:print#6,chr$(12):y=4
  20. 200 ifp=1thenx=1026:fori=0to7:forj=3to38
  21. 210 ifp=2thenx=1035:fori=0to7:pi$=chr$(14):forj=12to29
  22. 220 si=peek(x):ifsi<128andy=3theny=2
  23. 230 ifsi>127andy=4theny=1
  24. 240 ifsi>127thensi=si-128
  25. 250 ifsi=127thensi=191:goto250
  26. 260 ifsi>95thensi=si+32
  27. 270 ifsi>63thensi=si+32
  28. 280 ifsi<32thensi=si+64
  29. 290 si$=chr$(si):ify=1thensi$=chr$(18)+si$:y=3
  30. 300 ify=2thensi$=chr$(146)+si$:y=4
  31. 310 pi$=pi$+si$:x=x+1:next
  32. 320 print#4,chr$(15)pi$chr$(8):pi$="":if p=1 then x=x+4
  33. 330 ifp=2thenx=x+22
  34. 340 y=4:next:print#4,chr$(10)
  35. 350 close3:close4:close6:open10,4,10:print#10:close10:goto70
  36. 360 rem * save routine *
  37. 370 gosub680:printcp$:input"save file name";nf$
  38. 380 ifnf$=""then70
  39. 390 open3,3:open8,8,8,"0:"+nf$+",s,w"
  40. 400 ifp=1thenx=1026:fori=0to7:forj=3to38
  41. 410 ifp=2thenx=1035:fori=0to7:forj=12to29
  42. 420 y=peek(x):print#8,y:x=x+1:next:ifp=1thenx=x+4
  43. 430 ifp=2thenx=x+22
  44. 440 next:close3:close8:goto70
  45. 450 rem * load routine *
  46. 460 gosub680:printcp$:input"load file name";nf$
  47. 470 ifnf$=""then70
  48. 480 open3,3:open8,8,8,"0:"+nf$+",s,r"
  49. 490 ifp=1thenx=1026:fori=0to7:forj=3to38
  50. 500 ifp=2thenx=1035:fori=0to7:forj=12to29
  51. 510 input#8,y$:y=val(y$):pokex,y:x=x+1:next:ifp=1thenx=x+4
  52. 520 ifp=2thenx=x+22
  53. 530 next:close3:close8:goto70
  54. 540 rem * design a label *
  55. 550 gosub680:printcp$"center your label in the block above."
  56. 560 print"remember to leave spaces between lines."
  57. 570 print"press return[146] when done."
  58. 580 ifm=3goto600
  59. 590 gosub630
  60. 600 ifp=1theninput"";l$:goto70
  61. 610 ifp=2theninput"";l$:goto70
  62. 620 rem * subroutine for top lines *
  63. 630 ifp=1thenx$="  [146][144]                                      [146][144]"
  64. 640 ifp=2thenx$="           [146][144]                             [146][144]"
  65. 650 print"";:fori=0to7:printx$;:next:print""
  66. 660 return
  67. 670 rem * subroutine for bottom lines *
  68. 680 cp$="":x$="                                        "
  69. 690 printcp$;:fori=13to23:printx$;:next
  70. 700 print"                                       ":return
  71.